<template>
  <div class="DestinationTab-container">
    <h2 class="title">{{ title }}</h2>
    <Hot :iteminfo="iteminfo" :tabItemDate="tabItemDate" />
    <!-- <ul class="navbar">
      <li
        v-for="item in tabItemDate"
        :key="item.id"
        @mouseenter="destinationIndex = item.id"
      >
        <a :class="item.id == destinationIndex ? 'active' : ''">
          {{ item.area }}
        </a>
      </li>
    </ul> -->
    <!-- <div class="conlist">
      <div
        class="conlist-item"
        v-for="item in iteminfo.childrenOneItem"
        :key="item.id"
      >
        <h4>{{ item.name }}</h4>
        <ul class="col">
          <li
            v-for="childrenItem in item.childrenTwoItem"
            :key="childrenItem.id"
          >
            <a href="#">{{ childrenItem.name }}</a>
          </li>
        </ul>
      </div>
    </div> -->
  </div>
</template>

<script>
import Hot from "./Hot";
export default {
  name: "DestinationTab",
  props: ["tabItemDate", "title"],
  data() {
    return {
      destinationIndex: 1,
    };
  },
  components: { Hot },
  computed: {
    iteminfo: {
      get() {
        if (!this.tabItemDate) return {};
        return this.tabItemDate.find(
          (item) => item.id == this.destinationIndex
        );
      },
      set(val) {
        console.log(val);
      },
    },
  },
  watch: {},
};
</script>

<style lang="stylus" scoped>
.DestinationTab-container {
  margin-top: 30px;
  margin-bottom: 100px;
  padding-bottom: 30px;
  border-bottom: 3px solid #eee;

  .title {
    text-align: center;
    margin-bottom: 38px;
    font-size: 26px;
    font-weight: normal;
    color: #333;
    line-height: 26px;
  }
}
</style>